home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / ddj0897.zip / CCDBMS.ZIP / MAIN.CPP < prev    next >
C/C++ Source or Header  |  1997-03-18  |  1KB  |  40 lines

  1. // =================================================================
  2. // Dbcmd.cpp 
  3. // =================================================================
  4. // Harold Kasperink / John Dekker 
  5. // Dr. Dobb's Journal 1997
  6. // =================================================================
  7. // Main program
  8. // 
  9. // This program gives you an idea of how you can put the classes 
  10. // together to a real program. We have set up the example in a way
  11. // that it will compile but it doesn't provide real functionallity
  12. // We've worked around the Thread and the Oracle Databse stuff because
  13. // we want to illustrate how our program skeleton works and because 
  14. // you maybe haven't the appropriate libraries at your system. 
  15. // However the program should contain enough information to 
  16. // rewrite it for your use in your own programming environment
  17. //
  18. // The project makefile is test made with Microsoft Visual C++ 4.2
  19. // =================================================================
  20. #include <stdio.h>
  21.  
  22. #include "database.h"
  23.  
  24. int main()
  25. {
  26.     // Set number of database connections to use
  27.     int        NrDbase = 1;
  28.     char    *pszFirstName = "User";
  29.     char    *pszLastName = "Test";
  30.  
  31.     CArrayDbase lDbArray(NrDbase, "User", "Password", "Connectionstring");
  32.     CDbase *pDb = CArrayDbase::ReserveDbase();
  33.     CDbFindPerson    lFindPerson(pszFirstName, pszLastName );
  34.     lFindPerson.Do();
  35.     CArrayDbase::ReleaseDbase(*pDb);
  36.  
  37.     return 0;
  38. }
  39.  
  40.